//
//  UIBarButtonItem + Extension.swift
//  Swift微博
//
//  Created by 白鹭 on 2017/3/5.
//  Copyright © 2017年 com.bailun91. All rights reserved.
//

import UIKit

extension UIBarButtonItem{
    
    convenience init(imgName:String) {
        
        let btn = UIButton()
        btn.setImage(UIImage(named: imgName), for: UIControlState())
        btn.setImage(UIImage(named: imgName + "_highlighted"), for: .highlighted)
        btn.sizeToFit()
        self.init(customView:btn)
    }

}
